import type { App } from "vue";
// 分页组件
import Pagination from "@/components/Pagination/index.vue";
// 自定义表格工具组件
import RightToolbar from "@/components/RightToolbar/index.vue";
// 富文本组件
import Editor from "@/components/Editor/index.vue";
// 文件上传组件
import FileUpload from "@/components/FileUpload/index.vue";
// 图片上传组件
import ImageUpload from "@/components/ImageUpload/index.vue";
// 图片预览组件
import ImagePreview from "@/components/ImagePreview/index.vue";
// 自定义树选择组件
import TreeSelect from "@/components/TreeSelect/index.vue";
// 字典标签组件
import DictTag from "@/components/DictTag/index.vue";

// 全局组件挂载
const componentPlugin = {
  install(app: App): void {
    app.component("DictTag", DictTag);
    app.component("Pagination", Pagination);
    app.component("TreeSelect", TreeSelect);
    app.component("FileUpload", FileUpload);
    app.component("ImageUpload", ImageUpload);
    app.component("ImagePreview", ImagePreview);
    app.component("RightToolbar", RightToolbar);
    app.component("Editor", Editor);
  }
};

export default componentPlugin;
